Formius.Validator_Factory = $.inherit({}, {
	create: function(namepsace, options, form) {
		if (namepsace in Formius) {
			options = $.extend({}, options || {})
			var messages = options.messages || null;
			if (Formius.Helper.isObject(messages)) {
				delete options.messages;
			}
			for (var i in options) {
				if (Formius.Helper.isObject(options[i]) && 'element' in options[i]) {
					try {
						options[i] = new Formius.Element_Value(options[i], form);
					} catch(e){}
				}
			}
			var validator = new Formius[namepsace](options);
			validator.setNS(namepsace);
			validator.setMessages(messages);
			return validator;
		}
		return null;
	}
});